#include "ip_macro.h"
#include "ip_common.h"

void bubble_sort(int arr[], int n)
{
    int i, j;
    int temp;
    for (i = 0; i < n; i++)
        for (j = 0; j < n - i - 1; j++)
            if (arr[j] < arr[j + 1])
            {
                temp = arr[j];
                arr[j] = arr[j + 1];
                arr[j + 1] = temp;
            }
}

int main()
{
    int arr[10] = {9, 5, 6, 3, 1, 2, 8, 7, 0, 4};
    bubble_sort(arr, NTBL(arr));
    printf_int_array(arr, NTBL(arr));

    return 0;
}